package 环形数组实现队列;


public class Test {
    public static void main(String[] args) {
        ArrayQueue1<Integer> queue = new ArrayQueue1<>(3);
        System.out.println(queue.offer(1));
        System.out.println(queue.offer(2));
        System.out.println(queue.offer(3));
        System.out.println(queue.offer(4));
        System.out.println(queue.peak());
        System.out.println(queue.poll());
        System.out.println();
        for (Integer i : queue) {
            System.out.println(i);
        }
    }
}
